﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Altbrot.Yawr.Entities;
using System.ComponentModel;

namespace Altbrot.Yawr.Buslogic
{
    public interface IBuslogicManager
    {
        event UpdateProgressMethodDelegate OnUpdateProgress;

        /// <summary>
        /// Gets the genre list.
        /// </summary>
        /// <returns></returns>
        List<FeedItem> GetGenreList(string url);

        /// <summary>
        /// Gets the genre list.
        /// </summary>
        /// <returns></returns>
        List<FeedItem> GetGenreList(string url, FeedItemDb db);

        /// <summary>
        /// Gets the genre list.
        /// </summary>
        /// <param name="url">The URL.</param>
        /// <param name="offsetHours">The offset hours.</param>
        /// <returns></returns>
        List<FeedItem> GetGenreList(string url, int offsetHours);

        /// <summary>
        /// Gets the station list.
        /// </summary>
        /// <param name="category">The category.</param>
        /// <returns></returns>
        List<FeedItem> GetStationList(string genre, string url);

        /// <summary>
        /// Gets the station list.
        /// </summary>
        /// <param name="category">The category.</param>
        /// <returns></returns>
        List<FeedItem> GetStationList(string genre, string url, FeedItemDb db);

        /// <summary>
        /// Gets the station urls.
        /// </summary>
        /// <param name="station">The station.</param>
        /// <returns></returns>
        List<FeedItem> GetStationUrls(FeedItem station, string tmpFilePath);

        /// <summary>
        /// Updates the genre list.
        /// </summary>
        /// <param name="items">The items.</param>
        void UpdateGenreList(List<FeedItem> items);

        /// <summary>
        /// Updates the station list.
        /// </summary>
        /// <param name="items">The items.</param>
        void UpdateStationList(List<FeedItem> items, string genre, string tmpFilePath, AsyncOperation asyncOp);

        /// <summary>
        /// Searches the specified expression.
        /// </summary>
        /// <param name="expression">The expression.</param>
        /// <returns></returns>
        List<FeedItem> Search(string expression);

        /// <summary>
        /// Gets the custom list.
        /// </summary>
        /// <returns></returns>
        List<FeedItem> GetFavoritesList();

        /// <summary>
        /// Toggles the favorite.
        /// </summary>
        /// <param name="id">The id.</param>
        void ToggleFavorite(Guid id);

        /// <summary>
        /// Updates the station.
        /// </summary>
        /// <param name="station">The station.</param>
        void UpdateStation(FeedItem station);
    }
}
